﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work6
{
    class Program
    {
        static void Main(string[] args)
        {
            //一. 通过创造实例调用类中的类成员


            Book book = new Book();

            //  1.对自定义属性赋值
            book.Id = 6;
            book.Name = "《你永远无法叫醒一个装睡的人》";
            book.Price = 3999.9;

            book.PrintBookInfo();
            Console.WriteLine();


            //2.类中给属性赋值的方法的调用
            book.SetBookInfo(123, "《追风筝的人》",99.9);
            book.Price = 9.9;

            book.PrintBookInfo();
            Console.WriteLine();
            Console.WriteLine();




            //二. 通过类名直接调用类中的静态成员
            Book1.SetBook1Info(666,"《偷影子的人》",66.6);
            Book1.Price = 0.1;
            Book1.PrintBook1Info();

        }
    }
}
